package com.muyu.danmo.service.impl;

import com.muyu.danmo.domain.DanmoTrainingTypeRelation;
import com.muyu.danmo.mapper.DanmoTrainingTypeRelationMapper;
import com.muyu.danmo.service.IDanmoTrainingTypeRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 培训班与类型关联Service业务层处理
 *
 * @author yangle
 * @date 2024-10-10
 */
@Service
public class DanmoTrainingTypeRelationServiceImpl implements IDanmoTrainingTypeRelationService
{
    @Autowired
    private DanmoTrainingTypeRelationMapper danmoTrainingTypeRelationMapper;

    /**
     * 查询培训班与类型关联
     *
     * @param id 培训班与类型关联主键
     * @return 培训班与类型关联
     */
    @Override
    public DanmoTrainingTypeRelation selectDanmoTrainingTypeRelationById(Long id)
    {
        return danmoTrainingTypeRelationMapper.selectDanmoTrainingTypeRelationById(id);
    }

    /**
     * 查询培训班与类型关联列表
     *
     * @param danmoTrainingTypeRelation 培训班与类型关联
     * @return 培训班与类型关联
     */
    @Override
    public List<DanmoTrainingTypeRelation> selectDanmoTrainingTypeRelationList(DanmoTrainingTypeRelation danmoTrainingTypeRelation)
    {
        return danmoTrainingTypeRelationMapper.selectDanmoTrainingTypeRelationList(danmoTrainingTypeRelation);
    }

    /**
     * 新增培训班与类型关联
     *
     * @param danmoTrainingTypeRelation 培训班与类型关联
     * @return 结果
     */
    @Override
    public int insertDanmoTrainingTypeRelation(DanmoTrainingTypeRelation danmoTrainingTypeRelation)
    {
        return danmoTrainingTypeRelationMapper.insertDanmoTrainingTypeRelation(danmoTrainingTypeRelation);
    }

    /**
     * 修改培训班与类型关联
     *
     * @param danmoTrainingTypeRelation 培训班与类型关联
     * @return 结果
     */
    @Override
    public int updateDanmoTrainingTypeRelation(DanmoTrainingTypeRelation danmoTrainingTypeRelation)
    {
        return danmoTrainingTypeRelationMapper.updateDanmoTrainingTypeRelation(danmoTrainingTypeRelation);
    }

    /**
     * 批量删除培训班与类型关联
     *
     * @param ids 需要删除的培训班与类型关联主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingTypeRelationByIds(Long[] ids)
    {
        return danmoTrainingTypeRelationMapper.deleteDanmoTrainingTypeRelationByIds(ids);
    }

    /**
     * 删除培训班与类型关联信息
     *
     * @param id 培训班与类型关联主键
     * @return 结果
     */
    @Override
    public int deleteDanmoTrainingTypeRelationById(Long id)
    {
        return danmoTrainingTypeRelationMapper.deleteDanmoTrainingTypeRelationById(id);
    }
}
